import pymysql

conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', password='root', charset='utf8', database='note',
                       autocommit=True)
print(conn.get_server_info())
